const {DataTypes} = require("sequelize"); // 导入内置数据类型
module.exports = (sequelize, Sequelize) => {

    // 用户表
    const messageBoards = sequelize.define("messageBoards", {
        title: {
            type: DataTypes.STRING,
            allowNull: false
        },
        content: {
            type: DataTypes.STRING,
            allowNull: false
        },
        avatar: {
            type: DataTypes.STRING,
            allowNull: false
        },
        content: {
            type: DataTypes.STRING,
            allowNull: false
        },
        LikeCount: {
            type: DataTypes.INTEGER,
            allowNull: false
        }
    }, {
        freezeTableName: true
        // 强制让模型名称等于表名称
    })
    return messageBoards
}